#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2019/1/17 0017 11:23
# @Author : Ares_Wang
# @Site : 
# @File : test2.py
# @Software: PyCharm

from src.core import *
from src.utils import *
from PIL import Image

img_path = r'H:\wangjianlian\data\formal_data\HER2\thrid_generation\train\20X\g3\3+_4930_10005565.jpg'

parameters = [9, (4,4), (2,2), None, True, None, False, True, None]

ft = Feature()

# img_path, method_name, size, parameters, convert_mode
feature = ft.extract_feature(img_path, "HOG", (256, 256), parameters, 'L')


im=Image.fromarray(feature[1])

im = im.convert('RGB')
im.show()
im.save(r'C:\Users\wangjianlian\Desktop\新建文件夹\HOG_visualize.jpg')

# a = 1